#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int birth = 0;
    int year = 0;
    int month = 0;
    scanf("%d", &birth);
    if (birth >= 100001)
    {

        month = birth % 100;
        year = birth % 10000;
        year = year / 100;
    }
    else
    {
        year = birth / 100;
        month = birth % 100;

    }
    if (year < 22)
    {
        printf("20%02d-%02d", year, month);
    }
    else
    {
        printf("19%02d-%02d", year, month);
    }
    return 0;
}